import { PokerConfig } from "../config/PokerConfig";
import { TextureConfig } from "../config/TextureConfig";
import Deck from "../data/Deck";
import { PokerIntensify } from "../data/PokerIntensify";

/**
 * 玩家背包的卡牌
 */
export default class DeckManager {

    constructor() {

    }

    pokerTexture(deck: Deck, poker: PokerConfig.EnumPoker | PokerIntensify): TextureConfig.PokerTexture {
        return this.pokerTextureIntensify((poker instanceof PokerIntensify) ? poker : deck.getPokerIntensify(poker));
    }

    pokerTextureIntensify(poker: PokerIntensify): TextureConfig.PokerTexture {
        const pokerTexture = TextureConfig.getTexture(poker.poker);
        if (poker.intensify.length == 0) {
            return pokerTexture;
        } else {
            return pokerTexture;
        }
    }

    deckTexture(deck: Deck) {
        return TextureConfig.Poker_Back
    }
}